package com.java2108.hetong.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bw.itext.pdf.annotation.PdfValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 合同信息表
 * </p>
 *
 * @author zhanggm
 * @since 2024-02-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ht_contract")
public class HtContract implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 合同ID
     */
    @PdfValue(colName = "合同编号")
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 用户ID
     */
    @PdfValue(colName = "用户ID")
    private Integer userId;

    /**
     * 分类ID
     */
    private Integer categoryId;

    @TableField(exist = false)
    private String categoryName;

    /**
     * 合同名称
     */

    private String name;

    /**
     * 合同日期
     */
//    @DateTimeFormat(pattern = "yyyy-MM-dd") //提交时候数据格式
//    @JsonFormat(pattern = "yyyy-MM-dd") //给前端（客户端）时候格式
    private LocalDate date;

    @TableField(exist = false)
    private LocalDate dateStart;

    @TableField(exist = false)
    private LocalDate dateEnd;

    /**
     * 合同金额
     */
    private BigDecimal total;

    /**
     * 合同状态
     */
    private String status;

    /**
     * 流程实例Id
     */
    private String processInstanceId;


    @TableField(exist = false)
    private String taskId;

    @TableField(exist = false)
    private String taskName;


    @TableField(exist = false)
    private List<Integer> typeIdList;





}
